<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>
</head>
<body>
    

    <div id="app">
        <h1>haha</h1>
        <h1 v-show="ok">haha,新增</h1>
        <span v-for="item in list" v-html="item"></span>
        <hr>
        <input type="button" @click="addtext" value="点击增加一行">
        <input type="button" @click="addbutton" value="点击增加一个">
    </div>


    <script type="text/javascript">
        var vm =new Vue({
            el: '#app',
            data: {
                ok:false,
                list:[]
            },
            methods:{
                addtext(){
                    this.ok=true
                },
                addbutton(){
                    this.list.push('<button>按钮</button>')
                }
            }

        })

    </script>
</body>
</html>